// 返回123的数据类型字符串表现形式
let s = typeof 123;
console.log("s =",s); // "number"
console.log("typeof s =",typeof s); //"string"

console.log("typeof 'abc' =",typeof 'abc'); // string
console.log("typeof false =",typeof false); //"boolean"
console.log("typeof undefined =",typeof undefined); //"undefined"
// 需要注意的事null返回的是object
console.log("typeof null =",typeof null); //"object"
// 需要注意function也是一种数据类型，并且返回的是function
console.log("typeof function(){} =",typeof function(){}); //"function"

// 以下是Object的结果
console.log("typeof new Object() =",typeof new Object()); //"object"
console.log("typeof new Array() =",typeof new Array()); //"object"
console.log("typeof new Date() =",typeof new Date()); //"object"
console.log("typeof /^[a-zA-Z]{5,20}$/ =",typeof /^[a-zA-Z]{5,20}$/); //"object"
console.log("typeof new Error() =",typeof new Error()); //"object"
console.log("typeof new Number(100) =",typeof new Number(100)); //'object'
console.log("typeof new String('abc') =",typeof new String('abc'));// 'object'
console.log("typeof new Boolean(true) =",typeof new Boolean(true));//'object'